<template>
  <a-table
    :columns="columns"
    rowKey="idcardNum"
    :pagination="false"
    :data-source="data"
    :loading="loading"
    size="small"
  >
    <span
      slot="money"
      slot-scope="text"
    >
      <span>￥{{ text | formatMoney }} </span>
    </span>
  </a-table>
</template>
<script>
export default {
  props: {
    data: {
      type: Array,
      default: () => []
    },
    loading: {
      type: Boolean,
      default: false
    }
  },
  data() {
    return {
      columns: [{
        title: '姓名',
        dataIndex: 'name',
      },
      {
        title: '项目金额',
        dataIndex: 'salaryFee',
        scopedSlots: { customRender: 'money' }
      }, {
        title: '手机号',
        dataIndex: 'phone',
        ellipsis: true
      }, {
        title: '身份证号',
        dataIndex: 'idcardNum',
        ellipsis: true
      }, {
        title: '开户行',
        dataIndex: 'bankName',
      }, {
        title: '银行卡号',
        dataIndex: 'bankCardNum',
        ellipsis: true
      }, {
        title: '备注',
        dataIndex: 'remark',
        ellipsis: true
      }]
    }
  }
}
</script>
